package com.jxc.model.po;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/***********************************************************************
 * Module:  Goods.java
 * Author:  Administrator
 * Purpose: Defines the Class Goods
 ***********************************************************************/

/**
 * 商品
 * 
 * @pdOid 9b05fe20-d505-4a97-a505-6781472ddb0a
 */
@Entity
@Table(name = "SPGL_GOODS")
public class Goods extends IdEntity implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 3494588527180088994L;
	/**
	 * 商品条码
	 * 
	 * @pdOid 0900ac48-679d-41f2-b125-1bf95823ee9b
	 */
	private String barcode;
	/**
	 * 款式
	 * 
	 * @pdOid ae2091a5-8a17-4693-8922-7e2e7418f69f
	 */
	private String type;
	/**
	 * 商品类别
	 * 
	 * @pdOid 62be03b1-0157-49e7-96cb-a26edcefaa16
	 */
	private GoodsType goodsType;
	/**
	 * 品牌
	 * 
	 * @pdOid 3343f5df-c7c4-4374-8698-3e0c0913fb17
	 */
	private Brand brand;
	/**
	 * 商品名称
	 * 
	 * @pdOid 30c206ed-632c-4619-a5e8-5d6e3f9c308d
	 */
	private String name;
	/**
	 * 单位
	 * 
	 * @pdOid 0494bcb3-ba58-4629-942f-62a0ccd8c2e4
	 */
	private String unit;
	/**
	 * 颜色
	 * 
	 * @pdOid 8b23ca84-8b7e-4dbc-b5c0-df34efd3680b
	 */
	private String color;
	/**
	 * 尺码
	 * 
	 * @pdOid 25be3b64-ea67-4923-b751-f235f10ecffa
	 */
	private String size;
	/**
	 * 吊牌价
	 * 
	 * @pdOid 93ad2cc9-40da-4a1e-909e-6ca8d6aec108
	 */
	private Double showPrice;
	/**
	 * 折扣
	 * 
	 * @pdOid b5b32b6e-e36d-4af5-882b-b788fed8f4cc
	 */
	private Discount discount;
	/**
	 * 售价
	 * 
	 * @pdOid 49873eca-a6fc-4c03-a307-aad38e090b98
	 */
	private Double salePrice;
	/**
	 * 进价
	 * 
	 */
	private Double buyPrice;
	/**
	 * 备注
	 * 
	 */
	private String remark;
	/**
	 * 价格1
	 * 
	 */
	private Double price1;
	/**
	 * 价格2
	 * 
	 */
	private Double price2;
	/**
	 * 价格3
	 * 
	 */
	private Double price3;
	/**
	 * 所属仓库
	 * 
	 */
	private Repertory repertory;
	/**
	 * 库存量
	 * 
	 */
	private Integer amount;
	/**
	 * 是否删除
	 * 
	 */
	private Boolean isDelete;
	/**
	 * 最近销售时间
	 * 
	 */
	private Date lastedSaleTime;

	/**
	 * 初始库存
	 */
	private Integer initAmount;
	/**
	 * 进货总数
	 */
	private Integer orderTotal;
	/**
	 * 进货退货总数
	 */
	private Integer orderReturnTotal;
	/**
	 * 销售总数
	 */
	private Integer saleTotal;
	/**
	 * 销售退货总数
	 */
	private Integer saleReturnTotal;
	/**
	 * 报损总数
	 */
	private Integer damageTotal;
	/**
	 * 调拔总数
	 */
	private Integer transferTotal;
	/**
	 * 库存总数
	 */
	private Integer repertoryTotal;

	public Goods() {
		super();
	}

	public Goods(Long id) {
		super(id);
	}

	@Column(name = "BUY_PRICE", length = 10, precision = 2)
	public Double getBuyPrice() {
		return buyPrice;
	}

	public void setBuyPrice(Double buyPrice) {
		this.buyPrice = buyPrice;
	}

	@Column(name = "REMARK")
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Column(name = "PRICE1", length = 10, precision = 2)
	public Double getPrice1() {
		return price1;
	}

	public void setPrice1(Double price1) {
		this.price1 = price1;
	}

	@Column(name = "PRICE2", length = 10, precision = 2)
	public Double getPrice2() {
		return price2;
	}

	public void setPrice2(Double price2) {
		this.price2 = price2;
	}

	@Column(name = "PRICE3", length = 10, precision = 2)
	public Double getPrice3() {
		return price3;
	}

	public void setPrice3(Double price3) {
		this.price3 = price3;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "REPERTORY_ID")
	public Repertory getRepertory() {
		return repertory;
	}

	public void setRepertory(Repertory repertory) {
		this.repertory = repertory;
	}

	@Column(name = "AMOUNT", length = 10, nullable = false, columnDefinition = "int default 0")
	public Integer getAmount() {
		return amount;
	}

	public void setAmount(Integer amount) {
		this.amount = amount;
	}

	@Column(name = "IS_DELETE", nullable = false, columnDefinition = "boolean default false")
	public Boolean getIsDelete() {
		return isDelete;
	}

	public void setIsDelete(Boolean isDelete) {
		this.isDelete = isDelete;
	}

	@Column(name = "LASTED_SALE_TIME")
	public Date getLastedSaleTime() {
		return lastedSaleTime;
	}

	public void setLastedSaleTime(Date lastedSaleTime) {
		this.lastedSaleTime = lastedSaleTime;
	}

	@Column(name = "BARCODE")
	public String getBarcode() {
		return barcode;
	}

	public void setBarcode(String barcode) {
		this.barcode = barcode;
	}

	@Column(name = "TYPE")
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "GOODS_TYPE_ID")
	public GoodsType getGoodsType() {
		return goodsType;
	}

	public void setGoodsType(GoodsType goodsType) {
		this.goodsType = goodsType;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "BRAND_ID")
	public Brand getBrand() {
		return brand;
	}

	public void setBrand(Brand brand) {
		this.brand = brand;
	}

	@Column(name = "NAME")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "UNIT")
	public String getUnit() {
		return unit;
	}

	public void setUnit(String unit) {
		this.unit = unit;
	}

	@Column(name = "SIZE")
	public String getSize() {
		return size;
	}

	public void setSize(String size) {
		this.size = size;
	}

	@Column(name = "SHOW_PRICE", length = 10, precision = 2)
	public Double getShowPrice() {
		return showPrice;
	}

	public void setShowPrice(Double showPrice) {
		this.showPrice = showPrice;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "DISCOUNT_ID")
	public Discount getDiscount() {
		return discount;
	}

	public void setDiscount(Discount discount) {
		this.discount = discount;
	}

	@Column(name = "SALE_PRICE", length = 10, precision = 2)
	public Double getSalePrice() {
		return salePrice;
	}

	public void setSalePrice(Double salePrice) {
		this.salePrice = salePrice;
	}

	@Column(name = "COLOR")
	public String getColor() {
		return color;
	}

	public void setColor(String color) {
		this.color = color;
	}

	@Column(name = "INIT_AMOUNT", length = 10, nullable = false, columnDefinition = "int default 0")
	public Integer getInitAmount() {
		return initAmount;
	}

	public void setInitAmount(Integer initAmount) {
		this.initAmount = initAmount;
	}

	@Column(name = "ORDER_TOTAL", length = 10, nullable = false, columnDefinition = "int default 0")
	public Integer getOrderTotal() {
		return orderTotal;
	}

	public void setOrderTotal(Integer orderTotal) {
		this.orderTotal = orderTotal;
	}

	@Column(name = "ORDER_RETURN_TOTAL", length = 10, nullable = false, columnDefinition = "int default 0")
	public Integer getOrderReturnTotal() {
		return orderReturnTotal;
	}

	public void setOrderReturnTotal(Integer orderReturnTotal) {
		this.orderReturnTotal = orderReturnTotal;
	}

	@Column(name = "SALE_TOTAL", length = 10, nullable = false, columnDefinition = "int default 0")
	public Integer getSaleTotal() {
		return saleTotal;
	}

	public void setSaleTotal(Integer saleTotal) {
		this.saleTotal = saleTotal;
	}

	@Column(name = "SALE_RETURN_TOTAL", length = 10, nullable = false, columnDefinition = "int default 0")
	public Integer getSaleReturnTotal() {
		return saleReturnTotal;
	}

	public void setSaleReturnTotal(Integer saleReturnTotal) {
		this.saleReturnTotal = saleReturnTotal;
	}

	@Column(name = "DAMAGE_TOTAL", length = 10, nullable = false, columnDefinition = "int default 0")
	public Integer getDamageTotal() {
		return damageTotal;
	}

	public void setDamageTotal(Integer damageTotal) {
		this.damageTotal = damageTotal;
	}

	@Column(name = "TRANSFER_TOTAL", length = 10, nullable = false, columnDefinition = "int default 0")
	public Integer getTransferTotal() {
		return transferTotal;
	}

	public void setTransferTotal(Integer transferTotal) {
		this.transferTotal = transferTotal;
	}

	@Column(name = "REPERTORY_TOTAL", length = 10, nullable = false, columnDefinition = "int default 0")
	public Integer getRepertoryTotal() {
		return repertoryTotal;
	}

	public void setRepertoryTotal(Integer repertoryTotal) {
		this.repertoryTotal = repertoryTotal;
	}

}